const Koa = require('koa');
const KoaRouter = require('koa-router');
const koaBody = require('koa-body');

let users = [
    { id: 1, username: 'dahai' },
    { id: 2, username: 'zMouse' }
];

const server = new Koa();

const router = new KoaRouter();

router.get('/users', async (ctx, next) => {

    ctx.body = users;

});


server.use(router.routes());

server.listen(8888);
